package com.ncr.travel.tas.configuration.management;

import java.lang.reflect.Method;
import java.util.List;
import java.util.Map.Entry;

public interface ConfigurationManager {

	/**
	 * check the object for any @ConfigurationAnnotation markups. Process
	 * the annotation to see if it is present in the configuration persistence store.
	 * @param <T>
	 * @param object
	 * @throws ConfigurationManagerException
	 */
	<T> void setValues(T object) throws ConfigurationManagerException;

	/**
	 * a method to explictly specify which object fields get set from calling ConfigurationManager
	 * @param object
	 * @param configurationNames
	 * @throws ConfigurationManagerException
	 */
	<T> void setValues(T object, List<String> configurationNames) throws ConfigurationManagerException;

	boolean isAnnotatedForConfiguration(Entry<String, GetterSetterPair> item);

	/**
	 * Extracts the core name minus 'get' or 'set' prefix
	 * @param getterSetter
	 * @throws ConfigurationManagerException if this is not a getter or setter
	 * @return
	 */
	String extractGetterSetterName(Method getterSetter) throws ConfigurationManagerException;

}